export const TYPE_OPTIONS = [
  {
    label: "越况告警",
    value: "01"
  },
  {
    label: "工况告警",
    value: "02"
  },
  {
    label: "故障告警",
    value: "03"
  }
];
export const TABLE_COLUNMS = [
  {
    title: "序号",
    key: "id",
    type: "index",
    width: 65,
    align: "center"
  },
  {
    title: "所属区域",
    key: "orgName"
  },
  {
    title: "客户名称",
    key: "custName"
  },
  {
    title: "站点名称",
    key: "siteName"
  },
  {
    title: "能源单元名称",
    key: "energyUnitName"
  },
  {
    title: "告警类型",
    key: "alarmType"
  },
  {
    title: "越线类型",
    key: "outOfLimit"
  },
  {
    title: "告警时间",
    key: "timeOfOccurrence"
  }
].map((element) => {
  const { width } = element;
  if (!width) {
    return {
      ...element,
      minWidth: 200
    };
  }
  return element;
});

export const TABLE_SETTING_COLUNMS = [
  {
    title: "序号",
    type: "index",
    key: "id",
    width: 65,
    align: "center"
  },
  {
    title: "客户名称",
    key: "custName"
  },
  {
    title: "测量点名称",
    key: "measName"
  },
  {
    title: "测量数据项",
    key: "cpDataNoName"
  },
  {
    title: "告警项名称",
    key: "warningNameNotCode"
  },
  {
    title: "告警类型",
    key: "warningTypeName"
  },
  {
    title: "告警最大值",
    key: "valueUpperLimit"
  },
  {
    title: "告警最小值",
    key: "valueLowerLimit"
  },
  {
    title: "状态",
    key: "effectiveSignName"
  }
].map((element) => {
  const { width } = element;
  if (!width) {
    return {
      ...element,
      minWidth: 200
    };
  }
  return element;
});

export const RULES_EDIT = {
  custId: [
    {
      required: true,
      message: "请选择客户名称",
      trigger: "change"
    }
  ],
  siteId: [
    {
      required: true,
      message: "请选择客户站点",
      trigger: "change"
    }
  ],
  measPointId: [
    {
      required: true,
      message: "请选择所测量点名称",
      trigger: "change"
    }
  ],
  cpDataNo: [
    {
      required: true,
      message: "请选择测量数据项",
      trigger: "change"
    }
  ],
  warningType: [
    {
      required: true,
      message: "请选择告警类型",
      trigger: "change"
    }
  ],
  warningId: [
    {
      required: true,
      message: "请选择告警项名称",
      trigger: "change"
    }
  ],
  alarmCount: [
    {
      required: true,
      message: "请选择触发次数",
      trigger: "change"
    }
  ],
  triggerPeriod: [
    {
      required: true,
      message: "请选择触发周期",
      trigger: "change"
    }
  ]
};
